import 'package:flutter_homemonitor/generated/json/base/json_convert_content.dart';
import 'package:flutter_homemonitor/model/detect_item_entity.dart';

DetectItemEntity $DetectItemEntityFromJson(Map<String, dynamic> json) {
  final DetectItemEntity detectItemEntity = DetectItemEntity();
  final String? itemCode = jsonConvert.convert<String>(json['ItemCode']);
  if (itemCode != null) {
    detectItemEntity.itemCode = itemCode;
  }
  final String? itemName = jsonConvert.convert<String>(json['ItemName']);
  if (itemName != null) {
    detectItemEntity.itemName = itemName;
  }
  final String? city = jsonConvert.convert<String>(json['City']);
  if (city != null) {
    detectItemEntity.city = city;
  }
  final String? district = jsonConvert.convert<String>(json['District']);
  if (district != null) {
    detectItemEntity.district = district;
  }
  final String? createTime = jsonConvert.convert<String>(json['CreateTime']);
  if (createTime != null) {
    detectItemEntity.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['UpdateTime']);
  if (updateTime != null) {
    detectItemEntity.updateTime = updateTime;
  }
  final String? memo = jsonConvert.convert<String>(json['Memo']);
  if (memo != null) {
    detectItemEntity.memo = memo;
  }
  final String? itemStats = jsonConvert.convert<String>(json['ItemStats']);
  if (itemStats != null) {
    detectItemEntity.itemStats = itemStats;
  }
  final double? projectManagerID =
      jsonConvert.convert<double>(json['ProjectManagerID']);
  if (projectManagerID != null) {
    detectItemEntity.projectManagerID = projectManagerID;
  }
  final String? reportNumber =
      jsonConvert.convert<String>(json['ReportNumber']);
  if (reportNumber != null) {
    detectItemEntity.reportNumber = reportNumber;
  }
  final String? inspectionType =
      jsonConvert.convert<String>(json['InspectionType']);
  if (inspectionType != null) {
    detectItemEntity.inspectionType = inspectionType;
  }
  final String? address = jsonConvert.convert<String>(json['Address']);
  if (address != null) {
    detectItemEntity.address = address;
  }
  final String? implementation =
      jsonConvert.convert<String>(json['Implementation']);
  if (implementation != null) {
    detectItemEntity.implementation = implementation;
  }
  final String? progress = jsonConvert.convert<String>(json['Progress']);
  if (progress != null) {
    detectItemEntity.progress = progress;
  }
  final double? contractId = jsonConvert.convert<double>(json['ContractId']);
  if (contractId != null) {
    detectItemEntity.contractId = contractId;
  }
  final dynamic analysis = json['Analysis'];
  if (analysis != null) {
    detectItemEntity.analysis = analysis;
  }
  final String? inTime = jsonConvert.convert<String>(json['InTime']);
  if (inTime != null) {
    detectItemEntity.inTime = inTime;
  }
  final String? editAssociatedData =
      jsonConvert.convert<String>(json['EditAssociatedData']);
  if (editAssociatedData != null) {
    detectItemEntity.editAssociatedData = editAssociatedData;
  }
  final double? wGS84X = jsonConvert.convert<double>(json['WGS84X']);
  if (wGS84X != null) {
    detectItemEntity.wGS84X = wGS84X;
  }
  final double? wGS84Y = jsonConvert.convert<double>(json['WGS84Y']);
  if (wGS84Y != null) {
    detectItemEntity.wGS84Y = wGS84Y;
  }
  final List<dynamic>? buildingList =
      (json['BuildingList'] as List<dynamic>?)?.map((e) => e).toList();
  if (buildingList != null) {
    detectItemEntity.buildingList = buildingList;
  }
  final DetectItemProjectManager? projectManager =
      jsonConvert.convert<DetectItemProjectManager>(json['ProjectManager']);
  if (projectManager != null) {
    detectItemEntity.projectManager = projectManager;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemEntity.id = id;
  }
  return detectItemEntity;
}

Map<String, dynamic> $DetectItemEntityToJson(DetectItemEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['ItemCode'] = entity.itemCode;
  data['ItemName'] = entity.itemName;
  data['City'] = entity.city;
  data['District'] = entity.district;
  data['CreateTime'] = entity.createTime;
  data['UpdateTime'] = entity.updateTime;
  data['Memo'] = entity.memo;
  data['ItemStats'] = entity.itemStats;
  data['ProjectManagerID'] = entity.projectManagerID;
  data['ReportNumber'] = entity.reportNumber;
  data['InspectionType'] = entity.inspectionType;
  data['Address'] = entity.address;
  data['Implementation'] = entity.implementation;
  data['Progress'] = entity.progress;
  data['ContractId'] = entity.contractId;
  data['Analysis'] = entity.analysis;
  data['InTime'] = entity.inTime;
  data['EditAssociatedData'] = entity.editAssociatedData;
  data['WGS84X'] = entity.wGS84X;
  data['WGS84Y'] = entity.wGS84Y;
  data['BuildingList'] = entity.buildingList;
  data['ProjectManager'] = entity.projectManager.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemEntityExtension on DetectItemEntity {
  DetectItemEntity copyWith({
    String? itemCode,
    String? itemName,
    String? city,
    String? district,
    String? createTime,
    String? updateTime,
    String? memo,
    String? itemStats,
    double? projectManagerID,
    String? reportNumber,
    String? inspectionType,
    String? address,
    String? implementation,
    String? progress,
    double? contractId,
    dynamic analysis,
    String? inTime,
    String? editAssociatedData,
    double? wGS84X,
    double? wGS84Y,
    List<dynamic>? buildingList,
    DetectItemProjectManager? projectManager,
    double? id,
  }) {
    return DetectItemEntity()
      ..itemCode = itemCode ?? this.itemCode
      ..itemName = itemName ?? this.itemName
      ..city = city ?? this.city
      ..district = district ?? this.district
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..memo = memo ?? this.memo
      ..itemStats = itemStats ?? this.itemStats
      ..projectManagerID = projectManagerID ?? this.projectManagerID
      ..reportNumber = reportNumber ?? this.reportNumber
      ..inspectionType = inspectionType ?? this.inspectionType
      ..address = address ?? this.address
      ..implementation = implementation ?? this.implementation
      ..progress = progress ?? this.progress
      ..contractId = contractId ?? this.contractId
      ..analysis = analysis ?? this.analysis
      ..inTime = inTime ?? this.inTime
      ..editAssociatedData = editAssociatedData ?? this.editAssociatedData
      ..wGS84X = wGS84X ?? this.wGS84X
      ..wGS84Y = wGS84Y ?? this.wGS84Y
      ..buildingList = buildingList ?? this.buildingList
      ..projectManager = projectManager ?? this.projectManager
      ..id = id ?? this.id;
  }
}

DetectItemProjectManager $DetectItemProjectManagerFromJson(
    Map<String, dynamic> json) {
  final DetectItemProjectManager detectItemProjectManager =
      DetectItemProjectManager();
  final String? userCode = jsonConvert.convert<String>(json['UserCode']);
  if (userCode != null) {
    detectItemProjectManager.userCode = userCode;
  }
  final String? userName = jsonConvert.convert<String>(json['UserName']);
  if (userName != null) {
    detectItemProjectManager.userName = userName;
  }
  final String? userPassWord =
      jsonConvert.convert<String>(json['UserPassWord']);
  if (userPassWord != null) {
    detectItemProjectManager.userPassWord = userPassWord;
  }
  final dynamic tEL = json['TEL'];
  if (tEL != null) {
    detectItemProjectManager.tEL = tEL;
  }
  final dynamic operateType = json['OperateType'];
  if (operateType != null) {
    detectItemProjectManager.operateType = operateType;
  }
  final dynamic memo = json['Memo'];
  if (memo != null) {
    detectItemProjectManager.memo = memo;
  }
  final String? searchSelfinput =
      jsonConvert.convert<String>(json['Search_SelfInput']);
  if (searchSelfinput != null) {
    detectItemProjectManager.searchSelfinput = searchSelfinput;
  }
  final String? searchAll = jsonConvert.convert<String>(json['Search_All']);
  if (searchAll != null) {
    detectItemProjectManager.searchAll = searchAll;
  }
  final String? searchParameterset =
      jsonConvert.convert<String>(json['Search_ParameterSet']);
  if (searchParameterset != null) {
    detectItemProjectManager.searchParameterset = searchParameterset;
  }
  final String? editSelfinput =
      jsonConvert.convert<String>(json['Edit_SelfInput']);
  if (editSelfinput != null) {
    detectItemProjectManager.editSelfinput = editSelfinput;
  }
  final String? editAll = jsonConvert.convert<String>(json['Edit_All']);
  if (editAll != null) {
    detectItemProjectManager.editAll = editAll;
  }
  final String? editUserinput =
      jsonConvert.convert<String>(json['Edit_UserInput']);
  if (editUserinput != null) {
    detectItemProjectManager.editUserinput = editUserinput;
  }
  final String? editUserpermissions =
      jsonConvert.convert<String>(json['Edit_UserPermissions']);
  if (editUserpermissions != null) {
    detectItemProjectManager.editUserpermissions = editUserpermissions;
  }
  final String? editProjectinput =
      jsonConvert.convert<String>(json['Edit_ProjectInput']);
  if (editProjectinput != null) {
    detectItemProjectManager.editProjectinput = editProjectinput;
  }
  final String? editParameterset =
      jsonConvert.convert<String>(json['Edit_ParameterSet']);
  if (editParameterset != null) {
    detectItemProjectManager.editParameterset = editParameterset;
  }
  final double? companyId = jsonConvert.convert<double>(json['company_id']);
  if (companyId != null) {
    detectItemProjectManager.companyId = companyId;
  }
  final double? officeId = jsonConvert.convert<double>(json['office_id']);
  if (officeId != null) {
    detectItemProjectManager.officeId = officeId;
  }
  final String? photo = jsonConvert.convert<String>(json['photo']);
  if (photo != null) {
    detectItemProjectManager.photo = photo;
  }
  final dynamic loginIp = json['login_ip'];
  if (loginIp != null) {
    detectItemProjectManager.loginIp = loginIp;
  }
  final dynamic loginDate = json['login_date'];
  if (loginDate != null) {
    detectItemProjectManager.loginDate = loginDate;
  }
  final String? loginFlag = jsonConvert.convert<String>(json['login_flag']);
  if (loginFlag != null) {
    detectItemProjectManager.loginFlag = loginFlag;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManager.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManager.delFlag = delFlag;
  }
  final dynamic qrcode = json['qrcode'];
  if (qrcode != null) {
    detectItemProjectManager.qrcode = qrcode;
  }
  final String? iMEI = jsonConvert.convert<String>(json['IMEI']);
  if (iMEI != null) {
    detectItemProjectManager.iMEI = iMEI;
  }
  final DetectItemProjectManagerCompany? company =
      jsonConvert.convert<DetectItemProjectManagerCompany>(json['company']);
  if (company != null) {
    detectItemProjectManager.company = company;
  }
  final DetectItemProjectManagerOffice? office =
      jsonConvert.convert<DetectItemProjectManagerOffice>(json['office']);
  if (office != null) {
    detectItemProjectManager.office = office;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManager.id = id;
  }
  return detectItemProjectManager;
}

Map<String, dynamic> $DetectItemProjectManagerToJson(
    DetectItemProjectManager entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['UserCode'] = entity.userCode;
  data['UserName'] = entity.userName;
  data['UserPassWord'] = entity.userPassWord;
  data['TEL'] = entity.tEL;
  data['OperateType'] = entity.operateType;
  data['Memo'] = entity.memo;
  data['Search_SelfInput'] = entity.searchSelfinput;
  data['Search_All'] = entity.searchAll;
  data['Search_ParameterSet'] = entity.searchParameterset;
  data['Edit_SelfInput'] = entity.editSelfinput;
  data['Edit_All'] = entity.editAll;
  data['Edit_UserInput'] = entity.editUserinput;
  data['Edit_UserPermissions'] = entity.editUserpermissions;
  data['Edit_ProjectInput'] = entity.editProjectinput;
  data['Edit_ParameterSet'] = entity.editParameterset;
  data['company_id'] = entity.companyId;
  data['office_id'] = entity.officeId;
  data['photo'] = entity.photo;
  data['login_ip'] = entity.loginIp;
  data['login_date'] = entity.loginDate;
  data['login_flag'] = entity.loginFlag;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['qrcode'] = entity.qrcode;
  data['IMEI'] = entity.iMEI;
  data['company'] = entity.company.toJson();
  data['office'] = entity.office.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerExtension on DetectItemProjectManager {
  DetectItemProjectManager copyWith({
    String? userCode,
    String? userName,
    String? userPassWord,
    dynamic tEL,
    dynamic operateType,
    dynamic memo,
    String? searchSelfinput,
    String? searchAll,
    String? searchParameterset,
    String? editSelfinput,
    String? editAll,
    String? editUserinput,
    String? editUserpermissions,
    String? editProjectinput,
    String? editParameterset,
    double? companyId,
    double? officeId,
    String? photo,
    dynamic loginIp,
    dynamic loginDate,
    String? loginFlag,
    dynamic remarks,
    bool? delFlag,
    dynamic qrcode,
    String? iMEI,
    DetectItemProjectManagerCompany? company,
    DetectItemProjectManagerOffice? office,
    double? id,
  }) {
    return DetectItemProjectManager()
      ..userCode = userCode ?? this.userCode
      ..userName = userName ?? this.userName
      ..userPassWord = userPassWord ?? this.userPassWord
      ..tEL = tEL ?? this.tEL
      ..operateType = operateType ?? this.operateType
      ..memo = memo ?? this.memo
      ..searchSelfinput = searchSelfinput ?? this.searchSelfinput
      ..searchAll = searchAll ?? this.searchAll
      ..searchParameterset = searchParameterset ?? this.searchParameterset
      ..editSelfinput = editSelfinput ?? this.editSelfinput
      ..editAll = editAll ?? this.editAll
      ..editUserinput = editUserinput ?? this.editUserinput
      ..editUserpermissions = editUserpermissions ?? this.editUserpermissions
      ..editProjectinput = editProjectinput ?? this.editProjectinput
      ..editParameterset = editParameterset ?? this.editParameterset
      ..companyId = companyId ?? this.companyId
      ..officeId = officeId ?? this.officeId
      ..photo = photo ?? this.photo
      ..loginIp = loginIp ?? this.loginIp
      ..loginDate = loginDate ?? this.loginDate
      ..loginFlag = loginFlag ?? this.loginFlag
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..qrcode = qrcode ?? this.qrcode
      ..iMEI = iMEI ?? this.iMEI
      ..company = company ?? this.company
      ..office = office ?? this.office
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerCompany $DetectItemProjectManagerCompanyFromJson(
    Map<String, dynamic> json) {
  final DetectItemProjectManagerCompany detectItemProjectManagerCompany =
      DetectItemProjectManagerCompany();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerCompany.parentId = parentId;
  }
  final dynamic parentIds = json['parent_ids'];
  if (parentIds != null) {
    detectItemProjectManagerCompany.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerCompany.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerCompany.sort = sort;
  }
  final String? areaId = jsonConvert.convert<String>(json['area_id']);
  if (areaId != null) {
    detectItemProjectManagerCompany.areaId = areaId;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerCompany.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerCompany.type = type;
  }
  final String? grade = jsonConvert.convert<String>(json['grade']);
  if (grade != null) {
    detectItemProjectManagerCompany.grade = grade;
  }
  final dynamic address = json['address'];
  if (address != null) {
    detectItemProjectManagerCompany.address = address;
  }
  final dynamic zipCode = json['zip_code'];
  if (zipCode != null) {
    detectItemProjectManagerCompany.zipCode = zipCode;
  }
  final dynamic master = json['master'];
  if (master != null) {
    detectItemProjectManagerCompany.master = master;
  }
  final dynamic phone = json['phone'];
  if (phone != null) {
    detectItemProjectManagerCompany.phone = phone;
  }
  final dynamic fax = json['fax'];
  if (fax != null) {
    detectItemProjectManagerCompany.fax = fax;
  }
  final dynamic email = json['email'];
  if (email != null) {
    detectItemProjectManagerCompany.email = email;
  }
  final String? uSEABLE = jsonConvert.convert<String>(json['USEABLE']);
  if (uSEABLE != null) {
    detectItemProjectManagerCompany.uSEABLE = uSEABLE;
  }
  final double? primaryPerson =
      jsonConvert.convert<double>(json['PRIMARY_PERSON']);
  if (primaryPerson != null) {
    detectItemProjectManagerCompany.primaryPerson = primaryPerson;
  }
  final double? deputyPerson =
      jsonConvert.convert<double>(json['DEPUTY_PERSON']);
  if (deputyPerson != null) {
    detectItemProjectManagerCompany.deputyPerson = deputyPerson;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerCompany.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerCompany.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerCompany.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerCompany.updateDate = updateDate;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManagerCompany.remarks = remarks;
  }
  final double? fromCompany = jsonConvert.convert<double>(json['FromCompany']);
  if (fromCompany != null) {
    detectItemProjectManagerCompany.fromCompany = fromCompany;
  }
  final dynamic fromOffice = json['FromOffice'];
  if (fromOffice != null) {
    detectItemProjectManagerCompany.fromOffice = fromOffice;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerCompany.delFlag = delFlag;
  }
  final DetectItemProjectManagerCompanyArea? area =
      jsonConvert.convert<DetectItemProjectManagerCompanyArea>(json['area']);
  if (area != null) {
    detectItemProjectManagerCompany.area = area;
  }
  final dynamic parentOffice = json['ParentOffice'];
  if (parentOffice != null) {
    detectItemProjectManagerCompany.parentOffice = parentOffice;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerCompany.id = id;
  }
  return detectItemProjectManagerCompany;
}

Map<String, dynamic> $DetectItemProjectManagerCompanyToJson(
    DetectItemProjectManagerCompany entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['area_id'] = entity.areaId;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['grade'] = entity.grade;
  data['address'] = entity.address;
  data['zip_code'] = entity.zipCode;
  data['master'] = entity.master;
  data['phone'] = entity.phone;
  data['fax'] = entity.fax;
  data['email'] = entity.email;
  data['USEABLE'] = entity.uSEABLE;
  data['PRIMARY_PERSON'] = entity.primaryPerson;
  data['DEPUTY_PERSON'] = entity.deputyPerson;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['FromCompany'] = entity.fromCompany;
  data['FromOffice'] = entity.fromOffice;
  data['del_flag'] = entity.delFlag;
  data['area'] = entity.area.toJson();
  data['ParentOffice'] = entity.parentOffice;
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerCompanyExtension
    on DetectItemProjectManagerCompany {
  DetectItemProjectManagerCompany copyWith({
    double? parentId,
    dynamic parentIds,
    String? name,
    double? sort,
    String? areaId,
    String? code,
    String? type,
    String? grade,
    dynamic address,
    dynamic zipCode,
    dynamic master,
    dynamic phone,
    dynamic fax,
    dynamic email,
    String? uSEABLE,
    double? primaryPerson,
    double? deputyPerson,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    dynamic remarks,
    double? fromCompany,
    dynamic fromOffice,
    bool? delFlag,
    DetectItemProjectManagerCompanyArea? area,
    dynamic parentOffice,
    double? id,
  }) {
    return DetectItemProjectManagerCompany()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..areaId = areaId ?? this.areaId
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..grade = grade ?? this.grade
      ..address = address ?? this.address
      ..zipCode = zipCode ?? this.zipCode
      ..master = master ?? this.master
      ..phone = phone ?? this.phone
      ..fax = fax ?? this.fax
      ..email = email ?? this.email
      ..uSEABLE = uSEABLE ?? this.uSEABLE
      ..primaryPerson = primaryPerson ?? this.primaryPerson
      ..deputyPerson = deputyPerson ?? this.deputyPerson
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..fromCompany = fromCompany ?? this.fromCompany
      ..fromOffice = fromOffice ?? this.fromOffice
      ..delFlag = delFlag ?? this.delFlag
      ..area = area ?? this.area
      ..parentOffice = parentOffice ?? this.parentOffice
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerCompanyArea
    $DetectItemProjectManagerCompanyAreaFromJson(Map<String, dynamic> json) {
  final DetectItemProjectManagerCompanyArea
      detectItemProjectManagerCompanyArea =
      DetectItemProjectManagerCompanyArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerCompanyArea.parentId = parentId;
  }
  final String? parentIds = jsonConvert.convert<String>(json['parent_ids']);
  if (parentIds != null) {
    detectItemProjectManagerCompanyArea.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerCompanyArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerCompanyArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerCompanyArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerCompanyArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerCompanyArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerCompanyArea.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerCompanyArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerCompanyArea.updateDate = updateDate;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    detectItemProjectManagerCompanyArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerCompanyArea.delFlag = delFlag;
  }
  final DetectItemProjectManagerCompanyAreaParentArea? parentArea =
      jsonConvert.convert<DetectItemProjectManagerCompanyAreaParentArea>(
          json['parentArea']);
  if (parentArea != null) {
    detectItemProjectManagerCompanyArea.parentArea = parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerCompanyArea.id = id;
  }
  return detectItemProjectManagerCompanyArea;
}

Map<String, dynamic> $DetectItemProjectManagerCompanyAreaToJson(
    DetectItemProjectManagerCompanyArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerCompanyAreaExtension
    on DetectItemProjectManagerCompanyArea {
  DetectItemProjectManagerCompanyArea copyWith({
    double? parentId,
    String? parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    String? remarks,
    bool? delFlag,
    DetectItemProjectManagerCompanyAreaParentArea? parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerCompanyArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerCompanyAreaParentArea
    $DetectItemProjectManagerCompanyAreaParentAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerCompanyAreaParentArea
      detectItemProjectManagerCompanyAreaParentArea =
      DetectItemProjectManagerCompanyAreaParentArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerCompanyAreaParentArea.parentId = parentId;
  }
  final dynamic parentIds = json['parent_ids'];
  if (parentIds != null) {
    detectItemProjectManagerCompanyAreaParentArea.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerCompanyAreaParentArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerCompanyAreaParentArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerCompanyAreaParentArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerCompanyAreaParentArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerCompanyAreaParentArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerCompanyAreaParentArea.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerCompanyAreaParentArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerCompanyAreaParentArea.updateDate = updateDate;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    detectItemProjectManagerCompanyAreaParentArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerCompanyAreaParentArea.delFlag = delFlag;
  }
  final DetectItemProjectManagerCompanyAreaParentAreaParentArea? parentArea =
      jsonConvert
          .convert<DetectItemProjectManagerCompanyAreaParentAreaParentArea>(
              json['parentArea']);
  if (parentArea != null) {
    detectItemProjectManagerCompanyAreaParentArea.parentArea = parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerCompanyAreaParentArea.id = id;
  }
  return detectItemProjectManagerCompanyAreaParentArea;
}

Map<String, dynamic> $DetectItemProjectManagerCompanyAreaParentAreaToJson(
    DetectItemProjectManagerCompanyAreaParentArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerCompanyAreaParentAreaExtension
    on DetectItemProjectManagerCompanyAreaParentArea {
  DetectItemProjectManagerCompanyAreaParentArea copyWith({
    double? parentId,
    dynamic parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    String? remarks,
    bool? delFlag,
    DetectItemProjectManagerCompanyAreaParentAreaParentArea? parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerCompanyAreaParentArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerCompanyAreaParentAreaParentArea
    $DetectItemProjectManagerCompanyAreaParentAreaParentAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerCompanyAreaParentAreaParentArea
      detectItemProjectManagerCompanyAreaParentAreaParentArea =
      DetectItemProjectManagerCompanyAreaParentAreaParentArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.parentId = parentId;
  }
  final String? parentIds = jsonConvert.convert<String>(json['parent_ids']);
  if (parentIds != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.parentIds =
        parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.createDate =
        createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.updateDate =
        updateDate;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.delFlag = delFlag;
  }
  final dynamic parentArea = json['parentArea'];
  if (parentArea != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.parentArea =
        parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerCompanyAreaParentAreaParentArea.id = id;
  }
  return detectItemProjectManagerCompanyAreaParentAreaParentArea;
}

Map<String, dynamic>
    $DetectItemProjectManagerCompanyAreaParentAreaParentAreaToJson(
        DetectItemProjectManagerCompanyAreaParentAreaParentArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea;
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerCompanyAreaParentAreaParentAreaExtension
    on DetectItemProjectManagerCompanyAreaParentAreaParentArea {
  DetectItemProjectManagerCompanyAreaParentAreaParentArea copyWith({
    double? parentId,
    String? parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    dynamic remarks,
    bool? delFlag,
    dynamic parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerCompanyAreaParentAreaParentArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOffice $DetectItemProjectManagerOfficeFromJson(
    Map<String, dynamic> json) {
  final DetectItemProjectManagerOffice detectItemProjectManagerOffice =
      DetectItemProjectManagerOffice();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOffice.parentId = parentId;
  }
  final dynamic parentIds = json['parent_ids'];
  if (parentIds != null) {
    detectItemProjectManagerOffice.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOffice.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOffice.sort = sort;
  }
  final String? areaId = jsonConvert.convert<String>(json['area_id']);
  if (areaId != null) {
    detectItemProjectManagerOffice.areaId = areaId;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOffice.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOffice.type = type;
  }
  final String? grade = jsonConvert.convert<String>(json['grade']);
  if (grade != null) {
    detectItemProjectManagerOffice.grade = grade;
  }
  final dynamic address = json['address'];
  if (address != null) {
    detectItemProjectManagerOffice.address = address;
  }
  final dynamic zipCode = json['zip_code'];
  if (zipCode != null) {
    detectItemProjectManagerOffice.zipCode = zipCode;
  }
  final dynamic master = json['master'];
  if (master != null) {
    detectItemProjectManagerOffice.master = master;
  }
  final dynamic phone = json['phone'];
  if (phone != null) {
    detectItemProjectManagerOffice.phone = phone;
  }
  final dynamic fax = json['fax'];
  if (fax != null) {
    detectItemProjectManagerOffice.fax = fax;
  }
  final dynamic email = json['email'];
  if (email != null) {
    detectItemProjectManagerOffice.email = email;
  }
  final String? uSEABLE = jsonConvert.convert<String>(json['USEABLE']);
  if (uSEABLE != null) {
    detectItemProjectManagerOffice.uSEABLE = uSEABLE;
  }
  final double? primaryPerson =
      jsonConvert.convert<double>(json['PRIMARY_PERSON']);
  if (primaryPerson != null) {
    detectItemProjectManagerOffice.primaryPerson = primaryPerson;
  }
  final double? deputyPerson =
      jsonConvert.convert<double>(json['DEPUTY_PERSON']);
  if (deputyPerson != null) {
    detectItemProjectManagerOffice.deputyPerson = deputyPerson;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOffice.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOffice.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOffice.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOffice.updateDate = updateDate;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManagerOffice.remarks = remarks;
  }
  final dynamic fromCompany = json['FromCompany'];
  if (fromCompany != null) {
    detectItemProjectManagerOffice.fromCompany = fromCompany;
  }
  final double? fromOffice = jsonConvert.convert<double>(json['FromOffice']);
  if (fromOffice != null) {
    detectItemProjectManagerOffice.fromOffice = fromOffice;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOffice.delFlag = delFlag;
  }
  final DetectItemProjectManagerOfficeArea? area =
      jsonConvert.convert<DetectItemProjectManagerOfficeArea>(json['area']);
  if (area != null) {
    detectItemProjectManagerOffice.area = area;
  }
  final DetectItemProjectManagerOfficeParentOffice? parentOffice =
      jsonConvert.convert<DetectItemProjectManagerOfficeParentOffice>(
          json['ParentOffice']);
  if (parentOffice != null) {
    detectItemProjectManagerOffice.parentOffice = parentOffice;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOffice.id = id;
  }
  return detectItemProjectManagerOffice;
}

Map<String, dynamic> $DetectItemProjectManagerOfficeToJson(
    DetectItemProjectManagerOffice entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['area_id'] = entity.areaId;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['grade'] = entity.grade;
  data['address'] = entity.address;
  data['zip_code'] = entity.zipCode;
  data['master'] = entity.master;
  data['phone'] = entity.phone;
  data['fax'] = entity.fax;
  data['email'] = entity.email;
  data['USEABLE'] = entity.uSEABLE;
  data['PRIMARY_PERSON'] = entity.primaryPerson;
  data['DEPUTY_PERSON'] = entity.deputyPerson;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['FromCompany'] = entity.fromCompany;
  data['FromOffice'] = entity.fromOffice;
  data['del_flag'] = entity.delFlag;
  data['area'] = entity.area.toJson();
  data['ParentOffice'] = entity.parentOffice.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeExtension
    on DetectItemProjectManagerOffice {
  DetectItemProjectManagerOffice copyWith({
    double? parentId,
    dynamic parentIds,
    String? name,
    double? sort,
    String? areaId,
    String? code,
    String? type,
    String? grade,
    dynamic address,
    dynamic zipCode,
    dynamic master,
    dynamic phone,
    dynamic fax,
    dynamic email,
    String? uSEABLE,
    double? primaryPerson,
    double? deputyPerson,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    dynamic remarks,
    dynamic fromCompany,
    double? fromOffice,
    bool? delFlag,
    DetectItemProjectManagerOfficeArea? area,
    DetectItemProjectManagerOfficeParentOffice? parentOffice,
    double? id,
  }) {
    return DetectItemProjectManagerOffice()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..areaId = areaId ?? this.areaId
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..grade = grade ?? this.grade
      ..address = address ?? this.address
      ..zipCode = zipCode ?? this.zipCode
      ..master = master ?? this.master
      ..phone = phone ?? this.phone
      ..fax = fax ?? this.fax
      ..email = email ?? this.email
      ..uSEABLE = uSEABLE ?? this.uSEABLE
      ..primaryPerson = primaryPerson ?? this.primaryPerson
      ..deputyPerson = deputyPerson ?? this.deputyPerson
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..fromCompany = fromCompany ?? this.fromCompany
      ..fromOffice = fromOffice ?? this.fromOffice
      ..delFlag = delFlag ?? this.delFlag
      ..area = area ?? this.area
      ..parentOffice = parentOffice ?? this.parentOffice
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeArea $DetectItemProjectManagerOfficeAreaFromJson(
    Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeArea detectItemProjectManagerOfficeArea =
      DetectItemProjectManagerOfficeArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeArea.parentId = parentId;
  }
  final String? parentIds = jsonConvert.convert<String>(json['parent_ids']);
  if (parentIds != null) {
    detectItemProjectManagerOfficeArea.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeArea.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeArea.updateDate = updateDate;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    detectItemProjectManagerOfficeArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeArea.delFlag = delFlag;
  }
  final DetectItemProjectManagerOfficeAreaParentArea? parentArea =
      jsonConvert.convert<DetectItemProjectManagerOfficeAreaParentArea>(
          json['parentArea']);
  if (parentArea != null) {
    detectItemProjectManagerOfficeArea.parentArea = parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeArea.id = id;
  }
  return detectItemProjectManagerOfficeArea;
}

Map<String, dynamic> $DetectItemProjectManagerOfficeAreaToJson(
    DetectItemProjectManagerOfficeArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeAreaExtension
    on DetectItemProjectManagerOfficeArea {
  DetectItemProjectManagerOfficeArea copyWith({
    double? parentId,
    String? parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    String? remarks,
    bool? delFlag,
    DetectItemProjectManagerOfficeAreaParentArea? parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeAreaParentArea
    $DetectItemProjectManagerOfficeAreaParentAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeAreaParentArea
      detectItemProjectManagerOfficeAreaParentArea =
      DetectItemProjectManagerOfficeAreaParentArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeAreaParentArea.parentId = parentId;
  }
  final dynamic parentIds = json['parent_ids'];
  if (parentIds != null) {
    detectItemProjectManagerOfficeAreaParentArea.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeAreaParentArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeAreaParentArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeAreaParentArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeAreaParentArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeAreaParentArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeAreaParentArea.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeAreaParentArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeAreaParentArea.updateDate = updateDate;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    detectItemProjectManagerOfficeAreaParentArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeAreaParentArea.delFlag = delFlag;
  }
  final DetectItemProjectManagerOfficeAreaParentAreaParentArea? parentArea =
      jsonConvert
          .convert<DetectItemProjectManagerOfficeAreaParentAreaParentArea>(
              json['parentArea']);
  if (parentArea != null) {
    detectItemProjectManagerOfficeAreaParentArea.parentArea = parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeAreaParentArea.id = id;
  }
  return detectItemProjectManagerOfficeAreaParentArea;
}

Map<String, dynamic> $DetectItemProjectManagerOfficeAreaParentAreaToJson(
    DetectItemProjectManagerOfficeAreaParentArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeAreaParentAreaExtension
    on DetectItemProjectManagerOfficeAreaParentArea {
  DetectItemProjectManagerOfficeAreaParentArea copyWith({
    double? parentId,
    dynamic parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    String? remarks,
    bool? delFlag,
    DetectItemProjectManagerOfficeAreaParentAreaParentArea? parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeAreaParentArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeAreaParentAreaParentArea
    $DetectItemProjectManagerOfficeAreaParentAreaParentAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeAreaParentAreaParentArea
      detectItemProjectManagerOfficeAreaParentAreaParentArea =
      DetectItemProjectManagerOfficeAreaParentAreaParentArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.parentId = parentId;
  }
  final String? parentIds = jsonConvert.convert<String>(json['parent_ids']);
  if (parentIds != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.parentIds =
        parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.createDate =
        createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.updateDate =
        updateDate;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.delFlag = delFlag;
  }
  final dynamic parentArea = json['parentArea'];
  if (parentArea != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.parentArea =
        parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeAreaParentAreaParentArea.id = id;
  }
  return detectItemProjectManagerOfficeAreaParentAreaParentArea;
}

Map<String, dynamic>
    $DetectItemProjectManagerOfficeAreaParentAreaParentAreaToJson(
        DetectItemProjectManagerOfficeAreaParentAreaParentArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea;
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeAreaParentAreaParentAreaExtension
    on DetectItemProjectManagerOfficeAreaParentAreaParentArea {
  DetectItemProjectManagerOfficeAreaParentAreaParentArea copyWith({
    double? parentId,
    String? parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    dynamic remarks,
    bool? delFlag,
    dynamic parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeAreaParentAreaParentArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeParentOffice
    $DetectItemProjectManagerOfficeParentOfficeFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeParentOffice
      detectItemProjectManagerOfficeParentOffice =
      DetectItemProjectManagerOfficeParentOffice();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeParentOffice.parentId = parentId;
  }
  final dynamic parentIds = json['parent_ids'];
  if (parentIds != null) {
    detectItemProjectManagerOfficeParentOffice.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeParentOffice.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeParentOffice.sort = sort;
  }
  final String? areaId = jsonConvert.convert<String>(json['area_id']);
  if (areaId != null) {
    detectItemProjectManagerOfficeParentOffice.areaId = areaId;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeParentOffice.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeParentOffice.type = type;
  }
  final String? grade = jsonConvert.convert<String>(json['grade']);
  if (grade != null) {
    detectItemProjectManagerOfficeParentOffice.grade = grade;
  }
  final dynamic address = json['address'];
  if (address != null) {
    detectItemProjectManagerOfficeParentOffice.address = address;
  }
  final dynamic zipCode = json['zip_code'];
  if (zipCode != null) {
    detectItemProjectManagerOfficeParentOffice.zipCode = zipCode;
  }
  final dynamic master = json['master'];
  if (master != null) {
    detectItemProjectManagerOfficeParentOffice.master = master;
  }
  final dynamic phone = json['phone'];
  if (phone != null) {
    detectItemProjectManagerOfficeParentOffice.phone = phone;
  }
  final dynamic fax = json['fax'];
  if (fax != null) {
    detectItemProjectManagerOfficeParentOffice.fax = fax;
  }
  final dynamic email = json['email'];
  if (email != null) {
    detectItemProjectManagerOfficeParentOffice.email = email;
  }
  final String? uSEABLE = jsonConvert.convert<String>(json['USEABLE']);
  if (uSEABLE != null) {
    detectItemProjectManagerOfficeParentOffice.uSEABLE = uSEABLE;
  }
  final double? primaryPerson =
      jsonConvert.convert<double>(json['PRIMARY_PERSON']);
  if (primaryPerson != null) {
    detectItemProjectManagerOfficeParentOffice.primaryPerson = primaryPerson;
  }
  final double? deputyPerson =
      jsonConvert.convert<double>(json['DEPUTY_PERSON']);
  if (deputyPerson != null) {
    detectItemProjectManagerOfficeParentOffice.deputyPerson = deputyPerson;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeParentOffice.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeParentOffice.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeParentOffice.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeParentOffice.updateDate = updateDate;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManagerOfficeParentOffice.remarks = remarks;
  }
  final double? fromCompany = jsonConvert.convert<double>(json['FromCompany']);
  if (fromCompany != null) {
    detectItemProjectManagerOfficeParentOffice.fromCompany = fromCompany;
  }
  final dynamic fromOffice = json['FromOffice'];
  if (fromOffice != null) {
    detectItemProjectManagerOfficeParentOffice.fromOffice = fromOffice;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeParentOffice.delFlag = delFlag;
  }
  final DetectItemProjectManagerOfficeParentOfficeArea? area = jsonConvert
      .convert<DetectItemProjectManagerOfficeParentOfficeArea>(json['area']);
  if (area != null) {
    detectItemProjectManagerOfficeParentOffice.area = area;
  }
  final dynamic parentOffice = json['ParentOffice'];
  if (parentOffice != null) {
    detectItemProjectManagerOfficeParentOffice.parentOffice = parentOffice;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeParentOffice.id = id;
  }
  return detectItemProjectManagerOfficeParentOffice;
}

Map<String, dynamic> $DetectItemProjectManagerOfficeParentOfficeToJson(
    DetectItemProjectManagerOfficeParentOffice entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['area_id'] = entity.areaId;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['grade'] = entity.grade;
  data['address'] = entity.address;
  data['zip_code'] = entity.zipCode;
  data['master'] = entity.master;
  data['phone'] = entity.phone;
  data['fax'] = entity.fax;
  data['email'] = entity.email;
  data['USEABLE'] = entity.uSEABLE;
  data['PRIMARY_PERSON'] = entity.primaryPerson;
  data['DEPUTY_PERSON'] = entity.deputyPerson;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['FromCompany'] = entity.fromCompany;
  data['FromOffice'] = entity.fromOffice;
  data['del_flag'] = entity.delFlag;
  data['area'] = entity.area.toJson();
  data['ParentOffice'] = entity.parentOffice;
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeParentOfficeExtension
    on DetectItemProjectManagerOfficeParentOffice {
  DetectItemProjectManagerOfficeParentOffice copyWith({
    double? parentId,
    dynamic parentIds,
    String? name,
    double? sort,
    String? areaId,
    String? code,
    String? type,
    String? grade,
    dynamic address,
    dynamic zipCode,
    dynamic master,
    dynamic phone,
    dynamic fax,
    dynamic email,
    String? uSEABLE,
    double? primaryPerson,
    double? deputyPerson,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    dynamic remarks,
    double? fromCompany,
    dynamic fromOffice,
    bool? delFlag,
    DetectItemProjectManagerOfficeParentOfficeArea? area,
    dynamic parentOffice,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeParentOffice()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..areaId = areaId ?? this.areaId
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..grade = grade ?? this.grade
      ..address = address ?? this.address
      ..zipCode = zipCode ?? this.zipCode
      ..master = master ?? this.master
      ..phone = phone ?? this.phone
      ..fax = fax ?? this.fax
      ..email = email ?? this.email
      ..uSEABLE = uSEABLE ?? this.uSEABLE
      ..primaryPerson = primaryPerson ?? this.primaryPerson
      ..deputyPerson = deputyPerson ?? this.deputyPerson
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..fromCompany = fromCompany ?? this.fromCompany
      ..fromOffice = fromOffice ?? this.fromOffice
      ..delFlag = delFlag ?? this.delFlag
      ..area = area ?? this.area
      ..parentOffice = parentOffice ?? this.parentOffice
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeParentOfficeArea
    $DetectItemProjectManagerOfficeParentOfficeAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeParentOfficeArea
      detectItemProjectManagerOfficeParentOfficeArea =
      DetectItemProjectManagerOfficeParentOfficeArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeParentOfficeArea.parentId = parentId;
  }
  final String? parentIds = jsonConvert.convert<String>(json['parent_ids']);
  if (parentIds != null) {
    detectItemProjectManagerOfficeParentOfficeArea.parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeParentOfficeArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeParentOfficeArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeParentOfficeArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeParentOfficeArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeParentOfficeArea.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeParentOfficeArea.createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeParentOfficeArea.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeParentOfficeArea.updateDate = updateDate;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    detectItemProjectManagerOfficeParentOfficeArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeParentOfficeArea.delFlag = delFlag;
  }
  final DetectItemProjectManagerOfficeParentOfficeAreaParentArea? parentArea =
      jsonConvert
          .convert<DetectItemProjectManagerOfficeParentOfficeAreaParentArea>(
              json['parentArea']);
  if (parentArea != null) {
    detectItemProjectManagerOfficeParentOfficeArea.parentArea = parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeParentOfficeArea.id = id;
  }
  return detectItemProjectManagerOfficeParentOfficeArea;
}

Map<String, dynamic> $DetectItemProjectManagerOfficeParentOfficeAreaToJson(
    DetectItemProjectManagerOfficeParentOfficeArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeParentOfficeAreaExtension
    on DetectItemProjectManagerOfficeParentOfficeArea {
  DetectItemProjectManagerOfficeParentOfficeArea copyWith({
    double? parentId,
    String? parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    String? remarks,
    bool? delFlag,
    DetectItemProjectManagerOfficeParentOfficeAreaParentArea? parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeParentOfficeArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeParentOfficeAreaParentArea
    $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeParentOfficeAreaParentArea
      detectItemProjectManagerOfficeParentOfficeAreaParentArea =
      DetectItemProjectManagerOfficeParentOfficeAreaParentArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.parentId =
        parentId;
  }
  final dynamic parentIds = json['parent_ids'];
  if (parentIds != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.parentIds =
        parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.name = name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.sort = sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.code = code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.type = type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.createBy =
        createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.createDate =
        createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.updateBy =
        updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.updateDate =
        updateDate;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.remarks = remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.delFlag = delFlag;
  }
  final DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea?
      parentArea = jsonConvert.convert<
              DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea>(
          json['parentArea']);
  if (parentArea != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.parentArea =
        parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentArea.id = id;
  }
  return detectItemProjectManagerOfficeParentOfficeAreaParentArea;
}

Map<String, dynamic>
    $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaToJson(
        DetectItemProjectManagerOfficeParentOfficeAreaParentArea entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea.toJson();
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeParentOfficeAreaParentAreaExtension
    on DetectItemProjectManagerOfficeParentOfficeAreaParentArea {
  DetectItemProjectManagerOfficeParentOfficeAreaParentArea copyWith({
    double? parentId,
    dynamic parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    String? remarks,
    bool? delFlag,
    DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea?
        parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeParentOfficeAreaParentArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}

DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
    $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentAreaFromJson(
        Map<String, dynamic> json) {
  final DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
      detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea =
      DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea();
  final double? parentId = jsonConvert.convert<double>(json['parent_id']);
  if (parentId != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .parentId = parentId;
  }
  final String? parentIds = jsonConvert.convert<String>(json['parent_ids']);
  if (parentIds != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .parentIds = parentIds;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.name =
        name;
  }
  final double? sort = jsonConvert.convert<double>(json['sort']);
  if (sort != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.sort =
        sort;
  }
  final String? code = jsonConvert.convert<String>(json['code']);
  if (code != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.code =
        code;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.type =
        type;
  }
  final double? createBy = jsonConvert.convert<double>(json['create_by']);
  if (createBy != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['create_date']);
  if (createDate != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .createDate = createDate;
  }
  final double? updateBy = jsonConvert.convert<double>(json['update_by']);
  if (updateBy != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['update_date']);
  if (updateDate != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .updateDate = updateDate;
  }
  final dynamic remarks = json['remarks'];
  if (remarks != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.remarks =
        remarks;
  }
  final bool? delFlag = jsonConvert.convert<bool>(json['del_flag']);
  if (delFlag != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.delFlag =
        delFlag;
  }
  final dynamic parentArea = json['parentArea'];
  if (parentArea != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
        .parentArea = parentArea;
  }
  final double? id = jsonConvert.convert<double>(json['Id']);
  if (id != null) {
    detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea.id = id;
  }
  return detectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea;
}

Map<String, dynamic>
    $DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentAreaToJson(
        DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea
            entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['parent_id'] = entity.parentId;
  data['parent_ids'] = entity.parentIds;
  data['name'] = entity.name;
  data['sort'] = entity.sort;
  data['code'] = entity.code;
  data['type'] = entity.type;
  data['create_by'] = entity.createBy;
  data['create_date'] = entity.createDate;
  data['update_by'] = entity.updateBy;
  data['update_date'] = entity.updateDate;
  data['remarks'] = entity.remarks;
  data['del_flag'] = entity.delFlag;
  data['parentArea'] = entity.parentArea;
  data['Id'] = entity.id;
  return data;
}

extension DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentAreaExtension
    on DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea {
  DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea copyWith({
    double? parentId,
    String? parentIds,
    String? name,
    double? sort,
    String? code,
    String? type,
    double? createBy,
    String? createDate,
    double? updateBy,
    String? updateDate,
    dynamic remarks,
    bool? delFlag,
    dynamic parentArea,
    double? id,
  }) {
    return DetectItemProjectManagerOfficeParentOfficeAreaParentAreaParentArea()
      ..parentId = parentId ?? this.parentId
      ..parentIds = parentIds ?? this.parentIds
      ..name = name ?? this.name
      ..sort = sort ?? this.sort
      ..code = code ?? this.code
      ..type = type ?? this.type
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..remarks = remarks ?? this.remarks
      ..delFlag = delFlag ?? this.delFlag
      ..parentArea = parentArea ?? this.parentArea
      ..id = id ?? this.id;
  }
}
